package com.swagger.doc.swaggertodoc.dao;

import com.swagger.doc.swaggertodoc.req.Person;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
import org.springframework.stereotype.Repository;


/**
 * @author yanghui
 * @version 1.0.0
 * @ClassName Repository.java
 * @Description TODO
 * @Param
 * @createTime 2020年08月29日 15:48:00
 */
@Repository
public interface PersonRepository extends ElasticsearchRepository<Person, String> {

    //Optional<BookBean> findById(String id);

    Page<Person> findByAuthor(String author, Pageable pageable);

    Page<Person> findByTitle(String title, Pageable pageable);

}
